package com.example.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.dao.mapper.RuleValidatorLogDetailMapper;
import com.example.service.RuleValidatorService;
import com.example.vo.RuleValidatorLogDetailPageReqVO;
import com.example.vo.RuleValidatorLogDetailRespVO;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

/**
 * @author Houger.
 * @date 2025年01月08日 16:11.
 */
@Service
public class RuleValidatorServiceImpl implements RuleValidatorService {

    @Resource
    private RuleValidatorLogDetailMapper validatorLogDetailMapper;

    @DS("master")
    public IPage<RuleValidatorLogDetailRespVO> getValidatorLogDetailPage(RuleValidatorLogDetailPageReqVO pageReqVO) {
        IPage<RuleValidatorLogDetailRespVO> page = new Page<>((long)pageReqVO.getPageNo(), (long)pageReqVO.getPageSize());
        return validatorLogDetailMapper.queryValidatorLogDetailPage(pageReqVO, page);
    }
}
